home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / WANDR330.ZIP / SRC / HELP.C < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-05  |  11.6 KB  |  315 lines

  1. /* From jason@uucp.aeras */
  2.  
  3. #include "wand_head.h"
  4.  
  5. char *help[]={
  6. "      **  W A N D E R E R  **      ", /* 0 */
  7. "    ===========================    ", /* 1 */
  8. "        by Steven Shipway          ", /* 2 */
  9. "How to play:                       ", /* 3 */
  10. " Collect all the treasure:    /$\\  ", /* 4 */
  11. "                              \\$/  ", /* 5 */
  12. " Then go through the exit:    Way  ", /* 6 */
  13. "                              out  ", /* 7 */
  14. "  h  Left       j  Down            ", /* 8 */
  15. "  k  Up         l  Right           ", /* 9 */
  16. #ifdef NOISY
  17. "  1  Loud       q  Quit game       ", /* 10 */
  18. "  0  Quiet      !  Look at map     ", /* 11 */
  19. "  S  Save game  R  Restore Game    ", /* 12 */
  20. "  ?  Help mode  @  Center screen   ", /* 13 */
  21. "  ~  Jump level #  Switch mode     ", /* 14 */
  22. "  r  restart    W,^L Redraw screen ", /* 15 */
  23. #else
  24. "  q  Quit game  !  Look at map     ", /* 10 */
  25. "  S  Save game  R  Restore Game    ", /* 11 */
  26. "  ?  Help mode  @  Center screen   ", /* 12 */
  27. "  #  Other mode W,^L Redraw screen ", /* 13 */
  28. "  ~  Jump level r  Restart level   ", /* 14 */
  29. " (,),&,+,-,* record/play path      ", /* 15 */
  30. #endif
  31. "                                   ", /*  0 */
  32. "         Recording Solution Path   ", /*  1 */
  33. "  (  Start recording               ", /*  2 */
  34. "  )  Stop  recording               ", /*  3 */
  35. "  -  Place check point             ", /*  4 */
  36. "  *  Playback solution path        ", /*  5 */
  37. "  +  Continue playing from         ", /*  6 */
  38. "     check point.                  ", /*  7 */
  39. "  &  Continue recording from here  ", /*  8 */
  40. "                                   ", /*  9 */
  41. "  The speed of the playback can be ", /* 10 */
  42. "  adjusted with the > and < keys.  ", /* 11 */
  43. "                                   ", /* 12 */
  44. "  CNTL-W write to file             ", /* 13 */
  45. "  CNTL-R read from file            ", /* 14 */
  46. "                                   ", /* 15 */
  47.  
  48.  
  49.  
  50. "This is you:  You are a spider.    ", /* 0 */
  51. "      o       (At least, that's    ", /* 1 */
  52. "     <|>      what you look like)  ", /* 2 */
  53. "                                   ", /* 3 */
  54. "The other items you will find are: ", /* 4 */
  55. "                                   ", /* 5 */
  56. "  ###     -=- Solid Rock. The first", /* 6 */
  57. "  ### and =-= cannot be blown up.  ", /* 7 */
  58. "                                   ", /* 8 */
  59. "  <O>   Time capsule (5 points,    ", /* 9 */
  60. "        +250 extra moves)          ", /* 10 */
  61. "   .                               ", /* 11 */
  62. "  . .   Passable earth (one point) ", /* 12 */
  63. "                                   ", /* 13 */
  64. " (*)   Teleport  (50 points for    ", /* 14 */
  65. " (*)              using it)        ", /* 15 */
  66.  
  67. "  /^\\   Boulder (falls down, other ", /* 0 */
  68. "  \\_/   boulders and arrows fall   ", /* 1 */
  69. "        off of it)                 ", /* 2 */
  70. "                                   ", /* 3 */
  71. "  <--     -->  Arrows              ", /* 4 */
  72. "  <-- and -->  (run left and right)", /* 5 */
  73. "                                   ", /* 6 */
  74. "  TTT   Cage - holds baby monsters ", /* 7 */
  75. "  III   and changes into diamonds  ", /* 8 */
  76. "                                   ", /* 9 */
  77. "  /$\\    (10 points)               ", /* 0 */
  78. "  \\$/    Money  (collect it)       ", /* 1 */
  79. "                                   ", /* 2 */
  80. "  -o-  Baby monster (kills you)    ", /* 3 */
  81. "  /*\\                              ", /* 4 */
  82. "                                   ", /* 5 */
  83.  
  84. "When a baby monster hits a cage it ", /* 0 */
  85. "is captured and you get 50 points. ", /* 1 */
  86. "The cage also becomes a diamond.   ", /* 2 */
  87. "                                   ", /* 3 */
  88. "  I   Instant annihilation         ", /* 4 */
  89. "  o                                ", /* 5 */
  90. "                                   ", /* 6 */
  91. " \\_       _/   Slopes (boulders    ", /* 7 */
  92. "   \\ and /     and etc slide off)  ", /* 8 */
  93. "                                   ", /* 9 */
  94. " }o{  Monster  (eats you up whole. ", /* 0 */
  95. " /^\\  Yum Yum yum..) (100 points)  ", /* 1 */
  96. "      (kill with a rock or arrow)  ", /* 2 */
  97. "                                   ", /* 3 */
  98. " Way  Exit -- Must collect all the ", /* 4 */
  99. " out  treasure first. (250 bonus)  ", /* 5 */
  100.  
  101. " /~\\  Balloon -- rises, and is     ", /* 0 */
  102. " \\_X   popped by arrows. It does   ", /* 1 */
  103. "        *not* kill you.            ", /* 2 */
  104. "                                   ", /* 3*/
  105. " OOO  Unrecognised symbol in map.  ", /* 4*/
  106. " OOO  This is probably a **bug** ! ", /* 5*/
  107. "                                   ", /* 6 */
  108. " \\|/  'Thingy' - can be pushed in  ", /* 7 */
  109. " /|\\   any direction by you or by  ", /* 8 */
  110. "        arrows/boulders/balloons   ",  /* 9 */
  111. "                                   ",  /* 0 */
  112. " _|_  Another wall character, for  ",  /* 1 */
  113. " _|_  more variety to the game     ",  /* 2 */
  114. "                                   ",  /* 3 */
  115. " /\\*  Bomb - explodes when hit by  ",  /* 4 */
  116. " \\/  arrow/boulder. Destroys area. ",  /* 5 */
  117.  
  118. "  SCORING:                         ",  /* 0 */
  119. "    Score 1 for earth, 10 for money",  /* 1 */
  120. " 5 for capsule, 20 for teleporting ", /* 2 */
  121. " 100 for killing monster, 20 for   ", /* 3 */
  122. " catching baby monster, 250 for    ", /* 4 */
  123. " escaping with all the money.      ", /* 5 */
  124. "                                   ", /* 6 */
  125. " In MAP mode using # or ! command  ", /* 7 */
  126. "    O  Boulder   < >  Arrows       ", /* 8 */     
  127. "    ^  Balloon     :  Earth        ", /* 9 */
  128. "    !  Landmine    *  Treasure     ", /*10 */
  129. "  / \\  Deflectors  +  Cage        ", /*11 */
  130. "_ = #  Rock (# indestructable)     ", /*12 */
  131. "    T  Teleport    A  Arrival      ", /*13 */
  132. "    X  Exit        @  Start        ", /*14 */
  133. "    M  Big Monster S Baby Monster  ", /*15 */
  134.  
  135.  
  136. "    C  Time Capsule ~  Thingy      ", /* 0 */
  137. "    B  Bomb                        ", /* 1 */
  138. "                                   ", /* 2 */
  139. "   The speed of the animation      ", /* 3 */
  140. "   can be changed using m,n keys.  ", /* 4 */
  141. "                                   ", /* 5 */
  142. " ENVIRONMENT VARIABLES:            ", /* 6 */
  143. "                                   ", /* 7 */
  144. "   NEWNAME,NAME : Checked in that  ", /* 8 */
  145. "       order for the hiscore table ", /* 9 */
  146. "   NEWKEYS : Redefine movement keys", /*10 */
  147. "       eg- 'hlkj' for default      ", /*11 */
  148. "   SAVENAME : File used for saved  ", /*12 */
  149. "       games.                      ", /*13 */
  150. "                                   ", /*14 */
  151. "                                   ", /*15 */
  152.  
  153.  
  154. "                                   ",
  155. "  Options:                         ",
  156. "                                   ",
  157. "  -t (file) : test screen          ",
  158. "  -e (file) : edit screen          ",
  159. "  -c        : show credits file    ",
  160. "  -v        : show version  number ",
  161. "  -m        : edit hiscore file    ",
  162. "  -s        : show hiscore file    ",
  163. "  -k string : define keys          ",
  164. "  -f        : full-screen mode     ",
  165. #ifdef NOISY
  166. "  -1 and -0 : start wil bell on/off",
  167. #else
  168. "                                   ",
  169. #endif
  170. "                                   ",
  171. " *** Thanks to everyone who helped ",
  172. "     with the beta testing!        ",
  173. "                                   ",
  174. NULL };
  175.  
  176. char *edhelp[] = {
  177. " The Keys:                         ",
  178. "                                   ",
  179. "   n: play game with full screen   ",
  180. "   p: play with normal screen      ",
  181. "   c: change screen name           ",
  182. "   m: change moves allowance       ",
  183. "                                   ",
  184. "   \": next character is literal    ",
  185. "   L: check screen legality        ",
  186. "   q: quit, saving screen          ",
  187. "   x: exit, do not save screen     ",
  188. "   CTRL-R: read moves memory       ",
  189. "   CTRL-W: write moves memory      ",
  190. "   CTRL-L: redraw screen           ",
  191. "   CTRL-G: read screen file  (get) ",
  192. "   CTRL-P: write screen file (put) ",
  193.  
  194. "  THE WANDERER SCREEN EDITOR HELP  ",
  195. "  -------------------------------  ",
  196. "                                   ",
  197. "  The editor has a number of       ",
  198. " special features. The main ones   ",
  199. " are summarised at the bottom of   ",
  200. " the screen, but there are also    ",
  201. " a few more advanced features.     ",
  202. "  These are described on the next  ",
  203. " page.                             ",
  204. "                                   ",
  205. "  When playing a screen, you will  ",
  206. " not die (usually) but will instead",
  207. " be given the option of continuing ",
  208. " the game from where you died.     ",
  209. "                                   ",
  210.  
  211. " L: check legality                 ",
  212. "                                   ",
  213. "  The legality checker can also be ",
  214. " called via the -t option. Any     ",
  215. " minor errors - ie ones the game   ",
  216. " can survive - are prefixed with   ",
  217. " '+++' and any major (fatal) errors",
  218. " are prefixed '***'. A screen      ",
  219. " should have no errors.            ",
  220. "                                   ",
  221. "                                   ",
  222. " CTRL-W, CTRL-R: moves memory      ",
  223. "                                   ",
  224. "  When playing the game you have   ",
  225. " the ability to record your moves, ",
  226. " and to play them back again.      ",
  227.  
  228. "  You can save this memory to a    ",
  229. " text file, or load from a suitable",
  230. " file, using these keys. When      ",
  231. " playing the game, press '(' to    ",
  232. " start recording and ')' to end.   ",
  233. " Also, pressing '-' will introduce ",
  234. " a checkpoint.                     ",
  235. "  Press '*' to playback the moves  ",
  236. " from the beginning. The playback  ",
  237. " will stop at the end, or at a     ",
  238. " checkpoint. Press '+' to continue ",
  239. " from a checkpoint.                ",
  240. "  Pressing '&' will start recording",
  241. " from the current position - this  ",
  242. " will either extend the memory,    ",
  243. " or, if used when playback has     ",
  244.  
  245. " stopped at a checkpoint, it will  ",
  246. " overwrite any following data.     ",
  247. "                                   ",
  248. "  The memory is a maximum of 1024  ",
  249. " bytes (this can be changed in the ",
  250. " wand_head.h file).                ",
  251. "                                   ",
  252. "                                   ",
  253. " CTRL-G and CTRL-P: get and put    ",
  254. "                                   ",
  255. "  These will read and write the    ",
  256. " screen data. As with the memory   ",
  257. " functions, a file name is prompted",
  258. " for. Pressing return will use the ",
  259. " default provided.                 ",
  260. "                                   ",
  261.  
  262. NULL };
  263.  
  264. extern WINDOW *win;
  265.  
  266. void
  267. helpme(htype)    /* routine to show help menu. */
  268. int htype;    /* 0 == editor              */
  269. {
  270.     int  i = 0, i2 = 0;    /* loop counters */
  271.     char *ptr;        /* pointer in array.. */
  272.     char ch;
  273.     char **helplist;
  274.  
  275.     if (htype)
  276.     helplist = help;
  277.     else
  278.     helplist = edhelp;
  279.  
  280.     /* clear board - fullscreen mode is too big to overlay */
  281.     for (i = 0; i < 18; i++) {
  282.     wmove(win,i,0);
  283.     waddstr(win,"                                           ");
  284.     }
  285.  
  286.     while (helplist[i2]) {    /* times to show loop. */
  287.     for (i = 0; i < 16; i++) {    /* show one menu. */
  288.         ptr = helplist[i2++];
  289.         wmove(win,i,0);  /* move to start of line. */
  290.         waddstr(win,ptr);
  291.     }
  292.     wmove(win,i,0);    /* move to start of line. */
  293. #ifdef TVI
  294.     waddstr(win,TVI);
  295. #else
  296.     wstandout(win);
  297. #endif
  298.     if (helplist[i2])
  299.         waddstr(win,"Press any key to continue, q to exit");
  300.     else
  301.         waddstr(win,"End of help. Press any key to exit    ");
  302. #ifdef NOTVI
  303.     addstr(NOTVI);
  304. #else
  305.     wstandend(win);
  306. #endif
  307.     wrefresh(win);    /* show on screen. */
  308.     ch = (char) wgetch(win); /* just for now, get anything. */
  309.     if (ch == 'q')    /* if return or what ever.. */
  310.         break;    /* exit routine now. */
  311.     }
  312.     wmove(win,i,0);  /* move to start of line. */
  313.     waddstr(win,"                                        ");
  314. }
  315.